<template>
	<!-- 搜索栏导航 -->
	<header>
		<van-nav-bar
			left-text=""
			right-text="搜索"
			left-arrow
			fixed
			@click-left="retreat"
			@click-right="getRanking">
			<form action="/" slot="title" @click="getRanking">
			  <van-search
			    v-model="value"
			    placeholder="请输入关键词搜索"
			  />
			</form>
		</van-nav-bar>
		</div>
	</header>
</template>

<script>
	
	export default{
		data(){
			return{
				value:'',
				positionAddress:{},
			}
		},
		
		created(){
		},
		mounted(){
		},
		destroyed() {
		},
		
		methods:{
			//跳转搜索详细
			getRanking() {
			  this.$router.push('/About');
			},
			//后退
			retreat() {
				if (window.history.length <= 1) {
					this.$router.push({path:'/'})
				} else {
					this.$router.go(-1);
				}
			},
		}
	}
</script>

<style lang="less" scoped>
	.van-search{
		padding: 6px 12px;
		background:none !important;
	}
	.van-nav-bar__title{
		max-width: 80%;
	}
	.van-search__content{
		border-radius: 86px;
	}
</style>
